{% extends 'CuteFlowCoreBundle::admin.html.twig' %}

{% block title %}{{ parent() }} - {{ "basic.administration" | trans }}{% endblock %}

{% block contextual %}
    <a class="icon icon-add" href="{{ path('cuteflow_admin_usergroup_new') }}">{{ "user.usergroup.new" | trans }}</a>
{% endblock %}

{% block body %}
    <h2>{{ "user.usergroup.label" | trans }}</h2>
     {% if (app.session.hasFlash('saved.successful')) %}
        <div class="flash notice">
            {{ "user.usergroup.saved_successfully" | trans }}
        </div>
        <br/>
    {% endif %}

    {% if (app.session.hasFlash('deleted.successful')) %}
        <div class="flash notice">
            {{ "user.usergroup.deleted_successfully" | trans }}
        </div>
        <br/>
    {% endif %}

    <table class="list">
      <thead>
        <tr>
          <th>{{ "user.usergroup.name" | trans }}</th>
          <th>&nbsp;</th>
        </tr>
      </thead>
      <tbody>
      {% for entity in entities %}
        <tr class="{{ cycle(['odd', 'even'], loop.index) }}">
            <td>{{ entity.name }}</td>
             <td>
                <small><a href="{{ path('cuteflow_admin_usergroup_edit', {'id': entity.id}) }}" class="icon icon-edit">{{ "general.edit" | trans }}</a></small>
                <small><a href="{{ path('cuteflow_admin_usergroup_delete', {'id': entity.id}) }}" onclick="return confirm('{{ "user.usergroup.really_delete" | trans }}')" class="icon icon-del">{{ "general.delete" | trans }}</a></small>
            </td>
        </tr>
    {% endfor %}
      </tbody>
    </table>

{% endblock %}


